package com.pxxy.entity;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Objects;

/******************
 * @Author yejf
 * @Description 上课记录
 */
public class TeachRecord implements Serializable {

    private Integer id;

    private String courseName; //上课的课程名称

    private LocalDateTime classBeginTime; //上课开始时间

    private LocalDateTime classEndTime; //上课结束时间

    private String memberCardName; //会员卡名称

    private int count; //从会员卡中减除的次数

    private String memberName; //会员的姓名

    private Teacher teacher; //从属于哪个老师的上课记录

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("TeachRecord{");
        sb.append("id=").append(id);
        sb.append(", courseName='").append(courseName).append('\'');
        sb.append(", classBeginTime=").append(classBeginTime);
        sb.append(", classEndTime=").append(classEndTime);
        sb.append(", memberCardName='").append(memberCardName).append('\'');
        sb.append(", count=").append(count);
        sb.append(", memberName='").append(memberName).append('\'');
        sb.append('}');
        return sb.toString();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TeachRecord that = (TeachRecord) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(courseName, that.courseName) &&
                Objects.equals(classBeginTime, that.classBeginTime) &&
                Objects.equals(memberName, that.memberName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, courseName, classBeginTime, memberName);
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public LocalDateTime getClassBeginTime() {
        return classBeginTime;
    }

    public void setClassBeginTime(LocalDateTime classBeginTime) {
        this.classBeginTime = classBeginTime;
    }

    public LocalDateTime getClassEndTime() {
        return classEndTime;
    }

    public void setClassEndTime(LocalDateTime classEndTime) {
        this.classEndTime = classEndTime;
    }

    public String getMemberCardName() {
        return memberCardName;
    }

    public void setMemberCardName(String memberCardName) {
        this.memberCardName = memberCardName;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public String getMemberName() {
        return memberName;
    }

    public void setMemberName(String memberName) {
        this.memberName = memberName;
    }

    public Teacher getTeacher() {
        return teacher;
    }

    public void setTeacher(Teacher teacher) {
        this.teacher = teacher;
    }
}
